Games::Application.routes.draw do

  scope :module => 'admin' do
    resources :sessions, :grids, :topics, :nodes, :carousels, :photos, :guides, :levels, :manuals, :roles, :features, :equips, :sorts, :myinfos, :links, :bugs, :services, :faqs, :raids, :downloads, :dsorts, :events, :esorts
  end

  scope :module => 'site' do
    resources :home, :down, :faq, :only => [:index]
    resources :special, :games, :archives, :pictures, :gonglue, :only =>[:index, :show]
    resources :prop, :newto, :only => [:show]
    resources :category, :only => [:show] do
      resources :archives, :only => [:show]
    end
    resources :report, :only => [:index, :create]
  end

  match "/topics/category/:id" => "admin/topics#category"
  match "/photos/category/:id" => "admin/photos#category"

  post "/report" => "site/home#bugreport"

  get "/signin" => "admin/sessions#new", as:  :signin
  get "/signout" => "admin/sessions#destory", as:  :signout
  

  #root :to => 'admin/sessions#new'
  root :to => 'site/home#home'


end
